import 'package:json_annotation/json_annotation.dart';

part 'dict_data_model.g.dart';

@JsonSerializable()
class DictDataModel {
  final String? label, value, dictType;
  final int? status;

  DictDataModel({
    this.label,
    this.value,
    this.dictType,
    this.status,
  });

  static List<DictDataModel> fromJsonList(List jsonList) {
    List<DictDataModel> res = [];
    for (var item in jsonList) {
      res.add(DictDataModel.fromJson(item));
    }
    return res;
  }

  factory DictDataModel.fromJson(Map<String, dynamic> json) =>
      _$DictDataModelFromJson(json);

  Map<String, dynamic> toJson() => _$DictDataModelToJson(this);
}
